import { defineStore } from 'pinia';

export const useLegendStore = defineStore({
  id: 'app-legend',
  state: () => ({
    diplomacy: false, // 外交关系颜色图例
    event: false, // 事件态势图例
  }),
  getters: {
    getDiplomacy(): boolean {
      return this.diplomacy;
    },
    getEvent(): boolean {
      return this.event;
    },
  },
  actions: {
    setDiplomacy(visible: boolean) {
      this.diplomacy = visible;
    },
    setEvent(visible: boolean) {
      this.event = visible;
    },
  },
});
